<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="运输列表" bodyClass="gray-bg animated fadeInRight" isAnimation="false" libs=["table","zTree","layout-latest"]/>
<div class="container-div">
 <div class="row">
  <div class="col-sm-12 search-collapse">
    <@form.form id="transport-form" class="form-inline">
     <div class="select-list">
      <ul>
           <li>
              <label> <@ctx.i18n text = "订单号"/>：
               <input type="text" name="saleCode"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售员"/>：
               <input type="text" name="saleUserid"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "销售订单编号"/>：
               <input type="text" name="saleOrderNumber"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车辆识别号"/>：
               <input type="text" name="outCarVin"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "车型"/>：
               <input type="text" name="outCarVehicle"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "提车地点"/>： </label>
                <select name="transportTakeCarPlace" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_takecarplace')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "选择同事"/>：
               <input type="text" name="transportSelectColleague"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "提车地址"/>：
               <input type="text" name="transportTakeCarAddress"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "提车电话"/>：
               <input type="text" name="transportTakeCarPhone"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "送车地点"/>： </label>
                <select name="transportGiveCarPlace" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_takecarplace')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "选择同事"/>：
               <input type="text" name="transportGiveSelectColleague"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "送车地址"/>：
               <input type="text" name="transportGiveCarAddress"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "送车电话"/>：
               <input type="text" name="transportGiveCarPhone"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "运输状态"/>： </label>
                <select name="approvalCurrentStatus" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_transportstatus')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "计划提车时间"/>： </label>
            <input type="text" class="time-input" name="ApprovalPlanTakeCarTime"/>
        </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "预计到达日"/>： </label>
            <input type="text" class="time-input" name="ApprovalPlanArriveTime"/>
        </li>
           <li>
              <label> <@ctx.i18n text = "订单ID"/>：
               <input type="text" name="approvalOrderid"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "调度费用"/>：
               <input type="text" name="approvalCentralDispatchFee"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "运输公司名字"/>：
               <input type="text" name="transportCompanyName"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "运输公司支票接收地址"/>：
               <input type="text" name="transportCompanyCheckAddress"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "邮寄方式"/>： </label>
                <select name="transportMail" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_expresscompany')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
          <li class="select-time">
             <label> <@ctx.i18n text = "付款日期"/>： </label>
            <input type="text" class="time-input" name="CashierPayTime"/>
        </li>
           <li>
                 <label> <@ctx.i18n text = "汇款方式"/>： </label>
                <select name="cashierPayMethod" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_crm_remitmoney')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "证明"/>：
               <input type="text" name="cashierPayProofFilepath"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "收据单号"/>：
               <input type="text" name="cashierReceiptNumber"/> </label>
            </li>
           <li>
                 <label> <@ctx.i18n text = "支付结果"/>： </label>
                <select name="confirmPayMethod" class="form-control">
                    <option value=""><@ctx.i18n text = "所有"/></option>
                <#list dict.getType('sys_yes_no')>
                    <#items as d>
                        <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
           </li>
           <li>
              <label> <@ctx.i18n text = "金额"/>：
               <input type="text" name="confirmPayAmount"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "付款总额"/>：
               <input type="text" name="confirmPaySum"/> </label>
            </li>
           <li>
              <label> <@ctx.i18n text = "运输总费用"/>：
               <input type="text" name="transportTotalCost"/> </label>
            </li>
        <li>
          <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;&nbsp;<@ctx.i18n text = "查询"/></a>
          <a class="btn btn-warning btn-rounded btn-sm" onclick="opt.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<@ctx.i18n text = "重置"/></a>
       </li>
      </ul>
   </div>
  </@form.form>
 </div>
  <@table id="bootstrap-table">
    <@shiro.hasPermission name="bpm:transport:add">
                    <a class="btn btn-success" onclick="opt.operate.add()"><i class="fa fa-plus"></i>&nbsp;<@ctx.i18n text = "新增"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:transport:edit">
        <a class="btn btn-primary single disabled" onclick="opt.operate.edit()"><i class="fa fa-pencil-square-o"></i>&nbsp;<@ctx.i18n text = "修改"/></a>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="bpm:transport:del">
        <a class="btn btn-danger multiple disabled" onclick="opt.operate.delAll()">
            <i class="fa fa-remove"></i> <@ctx.i18n text = "删除"/>
        </a>
    </@shiro.hasPermission>
   </@table>
  <div>
</div>
<@footer>
<script>
    var editFlag = "${permission.hasPermi("bpm:transport:edit")}";
    var listFlag = "${permission.hasPermi("bpm:transport:add")}";
    var delFlag = "${permission.hasPermi("bpm:transport:del")}";
    var visible = ${permission.isPermitteds("bpm:transport:edit,bpm:transport:del,bpm:transport:add")?string('true', 'false')};
   var transportTakeCarPlaceDatas = ${dict.getDictListJson('sys_crm_takecarplace')};
   var transportGiveCarPlaceDatas = ${dict.getDictListJson('sys_crm_takecarplace')};
   var approvalCurrentStatusDatas = ${dict.getDictListJson('sys_crm_transportstatus')};
   var transportMailDatas = ${dict.getDictListJson('sys_crm_expresscompany')};
   var cashierPayMethodDatas = ${dict.getDictListJson('sys_crm_remitmoney')};
   var confirmPayMethodDatas = ${dict.getDictListJson('sys_yes_no')};
    var prefix = baseURL + "bpm/transport";

    $(function() {
        var options = {
            url: prefix + "/list",
            addUrl: prefix + "/add",
            editUrl: prefix + "/edit/{id}",
            delUrl: prefix + "/del",
            modalName: "运输",
            uniqueId:    'id'/* 唯一ID */                                                                                                 ,
            escape: true,            /* 分页设置 */
            showPageGo: true,       /* 分页设置 */
            pageSize: 10,            /* 分页设置 */
            pageList: [10, 30, 50], /* 分页设置 */
            columns: [
                {title: $.i18n.prop("序号"), width: 5, align: "center", formatter: function (value, row, index) {
                            return $.table.serialNumber(index);
                }}
                ,{field : 'id',title : '<@ctx.i18n text = "主键"/>',visible: false}
               ,{field : 'saleCode',title : '<@ctx.i18n text = "订单号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                     ,{field : 'saleUserid',title : '<@ctx.i18n text = "销售员"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'saleOrderNumber',title : '<@ctx.i18n text = "销售订单编号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVin',title : '<@ctx.i18n text = "车辆识别号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'outCarVehicle',title : '<@ctx.i18n text = "车型"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'transportTakeCarPlace',title : '<@ctx.i18n text = "提车地点"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(transportTakeCarPlaceDatas, value); }}
              ,{field : 'transportSelectColleague',title : '<@ctx.i18n text = "选择同事"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportTakeCarAddress',title : '<@ctx.i18n text = "提车地址"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportTakeCarPhone',title : '<@ctx.i18n text = "提车电话"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'transportGiveCarPlace',title : '<@ctx.i18n text = "送车地点"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(transportGiveCarPlaceDatas, value); }}
              ,{field : 'transportGiveSelectColleague',title : '<@ctx.i18n text = "选择同事"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportGiveCarAddress',title : '<@ctx.i18n text = "送车地址"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportGiveCarPhone',title : '<@ctx.i18n text = "送车电话"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'approvalCurrentStatus',title : '<@ctx.i18n text = "运输状态"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(approvalCurrentStatusDatas, value); }}
               ,{field : 'approvalPlanTakeCarTime',title : '<@ctx.i18n text = "计划提车时间"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'approvalPlanArriveTime',title : '<@ctx.i18n text = "预计到达日"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'approvalOrderid',title : '<@ctx.i18n text = "订单ID"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'approvalCentralDispatchFee',title : '<@ctx.i18n text = "调度费用"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportCompanyName',title : '<@ctx.i18n text = "运输公司名字"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'transportCompanyCheckAddress',title : '<@ctx.i18n text = "运输公司支票接收地址"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'transportMail',title : '<@ctx.i18n text = "邮寄方式"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(transportMailDatas, value); }}
               ,{field : 'cashierPayTime',title : '<@ctx.i18n text = "付款日期"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'cashierPayMethod',title : '<@ctx.i18n text = "汇款方式"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(cashierPayMethodDatas, value); }}
              ,{field : 'cashierPayProofFilepath',title : '<@ctx.i18n text = "证明"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
              ,{field : 'cashierReceiptNumber',title : '<@ctx.i18n text = "收据单号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'confirmPayMethod',title : '<@ctx.i18n text = "支付结果"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(confirmPayMethodDatas, value); }}
              ,{field : 'confirmPayAmount',title : '<@ctx.i18n text = "金额"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'confirmPaySum',title : '<@ctx.i18n text = "付款总额"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{field : 'transportTotalCost',title : '<@ctx.i18n text = "运输总费用"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
               ,{title:"<@ctx.i18n text = "操作"/>",align: 'center',visible:visible,formatter: function(value, row, index) {
                        var actions = [];
                          actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="opt.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="opt.operate.del(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="showDetial(\'' + row.id + '\')"><i class="fa fa-remove"></i>查看</a>');
                         return actions.join('');
                    }
                }

                ]
            };
            $.table.init(options);
        });
        function showDetial(id) {
            opt.modal.open("查看",prefix+"/view1/"+id);
        }
</script>
</@footer>
</@pageTheme>